package cn.dengta.webapp.user.entity.game;

import cn.dengta.webapp.base.entity.TimeBasedEntity;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

/**
 * 小鸟游戏统计
 *
 * @author Ready
 * @since 2022-10-26
 */
@Setter
@Getter
@Accessors(chain = true)
@TableName("dt_game_score_count")
public class GameScoreCount extends TimeBasedEntity {

	private static final long serialVersionUID = 1L;

	/** 用户id */
	Long userId;
	/** 周期：格式yyyy_week 如2022_1 */
	String period;
	/** 游戏id */
	Long gameId;
	/** 分值 */
	Integer score;


	public static GameScoreCount init(Long userId, Long gameId, String period){
		GameScoreCount uc = new GameScoreCount();
		uc.setUserId(userId);
		uc.setGameId(gameId);
		uc.setPeriod(period);
		return uc;
	}
	public static final String USER_ID = "user_id";
	public static final String PERIOD = "period";
	public static final String GAME_ID = "game_id";
	public static final String SCORE = "score";

}
